package test;

import java.util.ArrayList;
import java.util.Scanner;

public class IsPrime {
	public static void main(String[] args) {
		final int M = 100000000;
		long start = System.currentTimeMillis();
		for (int i = 0; i < M; i++) {
			
		}
		long second = System.currentTimeMillis();
		/*for (int i = 0; i < M; i++) {
			isPrime_2(i);
		}*/
		long third = System.currentTimeMillis();
		System.out.println("first: " + (second - start));
		System.err.println("SLEEP:");
		
		try {
			Thread.sleep(10000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		ArrayList<Person> lists = new ArrayList<Person>();
		for (int i = 0; i < M; i++) {
			lists.add(new Person());
		}
		
		
	}

	static boolean isPrime_2(int num) {
		if (num == 2 || num == 3) {
			return true;
		}
		if (num % 6 != 1 && num % 6 != 5) {
			return false;
		}
		for (int i = 5; i * i <= num; i += 6) {
			if (num % i == 0 || num % (i + 2) == 0) {
				return false;
			}
		}
		return true;
	}
}
